package com.ch.client.openApi.service;

import com.ch.client.openApi.entity.Emp;
import com.ch.client.openApi.factory.EmpServiceFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "EMP-API", url = "127.0.0.1:8886", fallbackFactory = EmpServiceFactory.class)
public interface EmpService {

	@GetMapping("/emp/list")
	List<Emp> getEmpInfos();

	@GetMapping("/emp/info")
	String getEmpInfoByName(@RequestParam(value = "name", defaultValue = "wangzz_test") String name);
}
